package cn.edu.hit.core.db;

import cn.edu.hit.core.Document;

import java.util.Collections;
import java.util.List;
import java.util.Map;

public class EmptyDataConnection implements DataConnection {
    @Override
    public boolean connect(Map connectParams) {
        return false;
    }

    @Override
    public DataReader getReader() {
        return new DataReader() {
            @Override
            public Document getById(String _id) {
                return null;
            }

            @Override
            public List<Document> queryByTemplate(Map<String, Object> template) {
                return Collections.emptyList();
            }
        };
    }
}
